__author__="root"
__date__ ="$Sep 30, 2009 7:37:05 PM$"

import sql
import Student

StudentList = []

def ProcessStudents():

    cursor = sql.conn.cursor ()

    cursor.execute ("SELECT `id`,`login`,`pass` FROM `ps_students`")

    rows = cursor.fetchall ()

    for studentrow in rows:
        NewStudent = Student.New(studentrow[0], studentrow[1], studentrow[2]);
        NewStudent.open_main_page()
        NewStudent.do_login()
        NewStudent.FetchGrades()
        NewStudent.InsertData()


        StudentList.append( NewStudent )

    

